﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hierarchy.Master" AutoEventWireup="true" CodeBehind="selfEvaluation.aspx.cs" Inherits="AppraisalManagement.evaluation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
Self Evaluation
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>Welcome <%= Session[AppraisalManagement.utils.ApplicationConstants.LOGIN_NAME.ToString()] %> </div>
<table>
    <tr>
        <td>
        
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataSourceID="EmpDetailsDataSource" CssClass ="gridview">
                <Columns>
                    <asp:BoundField DataField="grade_name" HeaderText="grade_name" 
                        SortExpression="grade_name" />
                    <asp:BoundField DataField="group_name" HeaderText="group_name" 
                        SortExpression="group_name" />
                    <asp:BoundField DataField="job_title" HeaderText="job_title" 
                        SortExpression="job_title" />
                    <asp:BoundField DataField="dept_name" HeaderText="dept_name" 
                        SortExpression="dept_name" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="EmpDetailsDataSource" runat="server" 
                ConnectionString="<%$ ConnectionStrings:balancescorecardConnectionString %>" 
                SelectCommand="SELECT grade.grade_name, [group].group_name, job.job_title, department.dept_name FROM employee_details INNER JOIN grade ON employee_details.emp_grade_id = grade.grade_pk INNER JOIN [group] ON employee_details.emp_group_id = [group].group_pk INNER JOIN job ON employee_details.emp_job_id = job.job_pk INNER JOIN department ON employee_details.emp_dept_id = department.dept_pk WHERE (employee_details.emp_pk = @empPk)">
                <SelectParameters>
                    <asp:SessionParameter DefaultValue="-1" Name="empPk" SessionField="LOGIN_PK" />
                </SelectParameters>
            </asp:SqlDataSource>
        
        </td>
    </tr>
    <tr>
        <td>
           
           <table class="gridview">
           <tr>
            <th> KPI Group</th>
            <th> KPI Name</th>
            <th> Max Marks</th>
            <th> Marks</th>
           </tr>
           
           <%foreach (AppraisalManagement.EmpKPILinkingDataSet.Employee_KPI_MarksRow marksRow in marksDt.Rows)
             {%>
            <tr>
                <td>
                    <%= marksRow.kpi_group_name %>                 
                </td>
                <td>
                    <%= marksRow.kpi_name %>                 
                </td>
                <td>
                    <%= marksRow.max_score %>                 
                </td>
                <td>
                  <asp:TextBox ID='txtMarks'  Text='0' runat='server' />
                </td> 
            </tr>
            <%}%>
            
           </table>
           
           
        </td>
    </tr>
    <tr>
        <td>
            <asp:Button ID="submitEvaluation" runat="server" Text ="Save Evaluation"
                PostBackUrl="selfEvaluation.aspx" onclick="submitEvaluation_Click" OnClientClick="return confirm('Please confirm whether you wish to submit KPI Evaluation!!');" />
        </td>
    </tr>
</table>

</asp:Content>
